package org.myself.meeting.mapper;

import org.apache.ibatis.annotations.Param;
import org.myself.meeting.model.Employee;
import org.myself.meeting.model.EmployeeWithDep;

import java.util.List;

public interface EmployeeMapper {

    Employee loadEmpByUsername(String username);

    Integer doReg(Employee employee);

    List<Employee> getEmpsBystatus(Integer status);

    Integer updateStatus(@Param("employeeid") Integer employeeid,@Param("status") Integer status);

    List<Employee> getAllEmps(@Param("emp") Employee employee, @Param("page") Integer page,@Param("pagesize") Integer pagesize);

    Long getTotal(Employee employee);

    List<Employee> getEmpsByDepId(Integer depId);

    Employee getEmpByEmpId(Integer employeeid);

    Integer updatePassword(@Param("employeeid")Integer employeeid, @Param("password") String newpassword);

    Integer updatePromoted(@Param("employeeid")Integer employeeid, @Param("status")Integer status,@Param("role")Integer role);

    Employee getEmpById(Integer employeeid);

    void deletByDepid(Integer departmentid);

    List<Employee> getAllEmpsAdmin();

    Integer deleteEmpById(Integer id);

    Integer updateAwardtimes(@Param("employeeid") Integer employeeid,@Param("awardtimes") Integer awardtimes);

    Integer updateAwardtimesByDepId(@Param("departmentid")Integer departmentid);
    Integer getawardtimes(Integer departmentid);

    List<Employee> getEmpsByDepRole(@Param("departmentid")Integer departmentid, @Param("role")Integer onerOlE);

    Employee getEmpsByUsername(String username);

    List<Employee> selectAllemp(Integer departmentid);

    void updateDepartment(Integer employeeid);

    Integer updateemp(Employee emp);
}
